/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package ve.com.fitsoft.eicb.encuesta.SB.service.persistence;

import com.liferay.portal.service.persistence.BasePersistence;

import ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta;

/**
 * The persistence interface for the encuesta service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author leo
 * @see EncuestaPersistenceImpl
 * @see EncuestaUtil
 * @generated
 */
public interface EncuestaPersistence extends BasePersistence<Encuesta> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link EncuestaUtil} to access the encuesta persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the encuesta in the entity cache if it is enabled.
	*
	* @param encuesta the encuesta
	*/
	public void cacheResult(
		ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta encuesta);

	/**
	* Caches the encuestas in the entity cache if it is enabled.
	*
	* @param encuestas the encuestas
	*/
	public void cacheResult(
		java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> encuestas);

	/**
	* Creates a new encuesta with the primary key. Does not add the encuesta to the database.
	*
	* @param idEncuesta the primary key for the new encuesta
	* @return the new encuesta
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta create(
		long idEncuesta);

	/**
	* Removes the encuesta with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param idEncuesta the primary key of the encuesta
	* @return the encuesta that was removed
	* @throws ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException if a encuesta with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta remove(
		long idEncuesta)
		throws com.liferay.portal.kernel.exception.SystemException,
			ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException;

	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta updateImpl(
		ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta encuesta, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the encuesta with the primary key or throws a {@link ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException} if it could not be found.
	*
	* @param idEncuesta the primary key of the encuesta
	* @return the encuesta
	* @throws ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException if a encuesta with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta findByPrimaryKey(
		long idEncuesta)
		throws com.liferay.portal.kernel.exception.SystemException,
			ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException;

	/**
	* Returns the encuesta with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param idEncuesta the primary key of the encuesta
	* @return the encuesta, or <code>null</code> if a encuesta with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta fetchByPrimaryKey(
		long idEncuesta)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the encuestas where groupId = &#63;.
	*
	* @param groupId the group ID
	* @return the matching encuestas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> findByGroupId(
		long groupId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the encuestas where groupId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param groupId the group ID
	* @param start the lower bound of the range of encuestas
	* @param end the upper bound of the range of encuestas (not inclusive)
	* @return the range of matching encuestas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> findByGroupId(
		long groupId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the encuestas where groupId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param groupId the group ID
	* @param start the lower bound of the range of encuestas
	* @param end the upper bound of the range of encuestas (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching encuestas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> findByGroupId(
		long groupId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first encuesta in the ordered set where groupId = &#63;.
	*
	* @param groupId the group ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching encuesta
	* @throws ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException if a matching encuesta could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta findByGroupId_First(
		long groupId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException;

	/**
	* Returns the first encuesta in the ordered set where groupId = &#63;.
	*
	* @param groupId the group ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching encuesta, or <code>null</code> if a matching encuesta could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta fetchByGroupId_First(
		long groupId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last encuesta in the ordered set where groupId = &#63;.
	*
	* @param groupId the group ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching encuesta
	* @throws ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException if a matching encuesta could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta findByGroupId_Last(
		long groupId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException;

	/**
	* Returns the last encuesta in the ordered set where groupId = &#63;.
	*
	* @param groupId the group ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching encuesta, or <code>null</code> if a matching encuesta could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta fetchByGroupId_Last(
		long groupId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the encuestas before and after the current encuesta in the ordered set where groupId = &#63;.
	*
	* @param idEncuesta the primary key of the current encuesta
	* @param groupId the group ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next encuesta
	* @throws ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException if a encuesta with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta[] findByGroupId_PrevAndNext(
		long idEncuesta, long groupId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException;

	/**
	* Returns all the encuestas that the user has permission to view where groupId = &#63;.
	*
	* @param groupId the group ID
	* @return the matching encuestas that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> filterFindByGroupId(
		long groupId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the encuestas that the user has permission to view where groupId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param groupId the group ID
	* @param start the lower bound of the range of encuestas
	* @param end the upper bound of the range of encuestas (not inclusive)
	* @return the range of matching encuestas that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> filterFindByGroupId(
		long groupId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the encuestas that the user has permissions to view where groupId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param groupId the group ID
	* @param start the lower bound of the range of encuestas
	* @param end the upper bound of the range of encuestas (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching encuestas that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> filterFindByGroupId(
		long groupId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the encuestas before and after the current encuesta in the ordered set of encuestas that the user has permission to view where groupId = &#63;.
	*
	* @param idEncuesta the primary key of the current encuesta
	* @param groupId the group ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next encuesta
	* @throws ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException if a encuesta with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta[] filterFindByGroupId_PrevAndNext(
		long idEncuesta, long groupId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			ve.com.fitsoft.eicb.encuesta.SB.NoSuchEncuestaException;

	/**
	* Returns all the encuestas.
	*
	* @return the encuestas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the encuestas.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of encuestas
	* @param end the upper bound of the range of encuestas (not inclusive)
	* @return the range of encuestas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the encuestas.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of encuestas
	* @param end the upper bound of the range of encuestas (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of encuestas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Encuesta> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the encuestas where groupId = &#63; from the database.
	*
	* @param groupId the group ID
	* @throws SystemException if a system exception occurred
	*/
	public void removeByGroupId(long groupId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the encuestas from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of encuestas where groupId = &#63;.
	*
	* @param groupId the group ID
	* @return the number of matching encuestas
	* @throws SystemException if a system exception occurred
	*/
	public int countByGroupId(long groupId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of encuestas that the user has permission to view where groupId = &#63;.
	*
	* @param groupId the group ID
	* @return the number of matching encuestas that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public int filterCountByGroupId(long groupId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of encuestas.
	*
	* @return the number of encuestas
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the preguntas associated with the encuesta.
	*
	* @param pk the primary key of the encuesta
	* @return the preguntas associated with the encuesta
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Pregunta> getPreguntas(
		long pk) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the preguntas associated with the encuesta.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the encuesta
	* @param start the lower bound of the range of encuestas
	* @param end the upper bound of the range of encuestas (not inclusive)
	* @return the range of preguntas associated with the encuesta
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Pregunta> getPreguntas(
		long pk, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the preguntas associated with the encuesta.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the encuesta
	* @param start the lower bound of the range of encuestas
	* @param end the upper bound of the range of encuestas (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of preguntas associated with the encuesta
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<ve.com.fitsoft.eicb.encuesta.SB.model.Pregunta> getPreguntas(
		long pk, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of preguntas associated with the encuesta.
	*
	* @param pk the primary key of the encuesta
	* @return the number of preguntas associated with the encuesta
	* @throws SystemException if a system exception occurred
	*/
	public int getPreguntasSize(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the pregunta is associated with the encuesta.
	*
	* @param pk the primary key of the encuesta
	* @param preguntaPK the primary key of the pregunta
	* @return <code>true</code> if the pregunta is associated with the encuesta; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsPregunta(long pk, long preguntaPK)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the encuesta has any preguntas associated with it.
	*
	* @param pk the primary key of the encuesta to check for associations with preguntas
	* @return <code>true</code> if the encuesta has any preguntas associated with it; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsPreguntas(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;
}